package com.rp.news.exception;

import com.rp.news.common.ResponseStatusEnum;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
public class MyCustomExeption extends RuntimeException {

    private ResponseStatusEnum responseStatusEnum;

    public MyCustomExeption(ResponseStatusEnum responseStatusEnum) {
        super("异常"+responseStatusEnum.status() + ";原因:" + responseStatusEnum.msg());
        this.responseStatusEnum = responseStatusEnum;
    }
}
